home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / psgml.info.z / psgml.info
Encoding:
GNU Info File  |  1998-05-21  |  55.7 KB  |  1,480 lines

  1. This is Info file ../info/psgml.info, produced by Makeinfo version 1.68
  2. from the input file psgml.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * PSGML: (psgml).          PSGML, a major mode for SGML documents.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    Documentation for PSGML, a major mode for SGML.
  9.  
  10.    Copyright 1994, 1996 Lennart Staflin
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, and provided
  18. that the entire resulting derived work is distributed under the terms
  19. of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that this permission notice may be stated in a
  24. translation approved by the Free Software Foundation.
  25.  
  26. 
  27. File: psgml.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
  28.  
  29. PSGML
  30. *****
  31.  
  32.    PSGML is a major mode for editing SGML documents.  This is the DRAFT
  33. documentation for PSGML version 1.0.
  34.  
  35. * Menu:
  36.  
  37. * Introduction::                Introduction
  38. * Install::                     How to install PSGML
  39. * Invoke::                      How to invoke PSGML
  40. * Entity manager::              The Entity Manager
  41. * Validate::                    Running an external SGML parser
  42. * SGML declaration::            Using an SGML declaration
  43. * Managing the DTD::            Specifying what DTD to use
  44. * Edit::                        Commands for editing
  45. * Display::                     Appearance of text in the buffer
  46. * Miscellaneous options::
  47. * Bugs::                        Reporting bugs
  48. * Index::
  49.  
  50. 
  51. File: psgml.info,  Node: Introduction,  Next: Install,  Prev: Top,  Up: Top
  52.  
  53. Introduction
  54. ************
  55.  
  56.    PSGML is a major mode for editing SGML documents.  It works with GNU
  57. Emacs 19.19 and later or with Lucid Emacs 19.9 and later.  PSGML
  58. contains a simple SGML parser and can work with any DTD.  Functions
  59. provided includes menus and commands for inserting tags with only the
  60. contextually valid tags, identification of structural errors, editing of
  61. attribute values in a separate window with information about types and
  62. defaults, and structure based editing.
  63.  
  64.    SGML, a language for encoding the structure of a document, is an ISO
  65. standard: ISO 8879:1986 "Information processing - Text and office
  66. systems - Standard Generalized Markup Language (SGML)".
  67.  
  68.    A good introduction to SGML is `A Gentle Introduction to SGML'
  69. produced by Text Encoding Initiative (this is really chapter 2 of TEI
  70. P3).  This can be found on
  71.  
  72.      `ftp://ftp.ifi.uio.no/pub/SGML/TEI/P3SG.DOC'.
  73.  
  74.    A SGML document has three major parts, in order:
  75.  
  76.   1. SGML Declaration (`<!SGML "ISO 8879:1986" ... >')
  77.  
  78.   2. Document Type Declaration (`<!DOCTYPE NAME ... >')
  79.  
  80.   3. Document Element (`<NAME> ... </NAME>')
  81.  
  82.    The SGML declaration contains general information about character
  83. sets, concrete syntax, and SGML features used.  PSGML does not use the
  84. SGML Declaration, it can be left out, and if included is ignored.  Many
  85. SGML systems allow the SGML declaration to be defaulted.  PSGML always
  86. use the Concrete Reference Syntax but without limitations on lengths.
  87. Features used has to be indicated with variables (*note SGML
  88. declaration::.).
  89.  
  90.    The document type declaration specifies the valid elements and
  91. entities and how they can be nested. A document type is usually needed,
  92. but can reside in another file (*note Managing the DTD::.).
  93.  
  94.    The system declaration for PSGML:
  95.      SYSTEM "ISO 8879:1986"
  96.         CHARSET
  97.           BASESET  "ISO 646-1983//CHARSET
  98.                     International Reference Version (IRV)//ESC 2/5 4/0"
  99.           DESCSET  0 128 0
  100.           CAPACITY PUBLIC  "ISO 8879:1986//CAPACITY Reference//EN"
  101.         FEATURES
  102.           MINIMIZE DATATAG NO  OMITTAG  YES   RANK     NO  SHORTTAG YES
  103.           LINK     SIMPLE  NO  IMPLICIT NO    EXPLICIT NO
  104.           OTHER    CONCUR  NO  SUBDOC   YES 1 FORMAL   YES
  105.           SCOPE    DOCUMENT
  106.           SYNTAX   PUBLIC  "ISO 8879:1986//SYNTAX Reference//EN"
  107.           VALIDATE
  108.                    GENERAL NO  MODEL    NO   EXCLUDE  NO  CAPACITY NO
  109.                    NONSGML NO  SGML     NO   FORMAL   NO
  110.           SDIF     PACK    NO  UNPACK   NO
  111.  
  112. 
  113. File: psgml.info,  Node: Install,  Next: Invoke,  Prev: Introduction,  Up: Top
  114.  
  115. Installing PSGML
  116. ****************
  117.  
  118.    To install PSGML you first need to uncompress and unpack the source
  119. archive.  This is done with the `gunzip' and `tar' commands.
  120.  
  121.      gunzip psgml-1.0.1.tar.gz; tar xf psgml-1.0.1.tar
  122.  
  123.    This should create a subdirectory to the current directory with the
  124. source code. This directory contains a `configure' command (see the
  125. file INSTALL for more information about configure).  You can use the
  126. `configure' command to configure the package or you can load the file
  127. `psgml-maint' and execute the `psgml-compile-files' command.
  128.  
  129.    Place the `*.el' and the `*.elc' files in a directory where Emacs
  130. can find it (i.e. one of the directories in the `load-path' variable,
  131. you can add a directory to this variable in your `.emacs'.)
  132.  
  133.    If you use the `configure' approach, compile psgml with `make' and
  134. the you can run `make install' to install it in the system library
  135. `site-lisp'.  The files are installed in a subdirectory named `psgml'.
  136. The location of `site-lisp' is figured out by `configure', but you can
  137. change it in the `Makefile'.  You need to make sure that this
  138. subdirectory is in Emacs `load-path'.
  139.  
  140.    Put the following line in your .emacs:
  141.  
  142.      (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
  143.  
  144.    You may also want to set up search paths for external entities,
  145. *Note Entity manager::.
  146.  
  147.    The `psgml.info' is the documentation for PSGML in the info format.
  148. You can read this with the Emacs command `C-u C-h i'.  You can also
  149. install the file in your systems info directory and edit the `dir' file
  150. to include `psgml.info' in the menu.
  151.  
  152.    The info file `psgml.info' is created from the texinfo file
  153. `psgml.texi'.  The texinfo file can also be used to create a hard copy
  154. of the documentation.  To do this you need the TeX program and a copy
  155. of `texinfo.tex'.
  156.  
  157. 
  158. File: psgml.info,  Node: Invoke,  Next: Entity manager,  Prev: Install,  Up: Top
  159.  
  160. How to invoke PSGML
  161. *******************
  162.  
  163.    PSGML defines a major mode called `sgml-mode'.  Files with
  164. extensions `.sgml', `.sgm' or `.dtd' will automatically be edited in
  165. SGML mode.  To edit some other file in sgml mode, type `M-x sgml-mode
  166. <RET>' after finding the file.
  167.  
  168.    If you can modify the file you can add a "Local Variables" list
  169. (*note Local Variables in Files: (emacs)file variables.) to the end of
  170. the file.  This can make Emacs automatically set sgml mode and user
  171. options when the file is loaded.  The simplest Local Variables list
  172. would look like:
  173.  
  174.      <!--
  175.      Local Variables:
  176.      mode: sgml
  177.      End:
  178.      -->
  179.  
  180.    You can also put a line at the top of the file to tell emacs to use
  181. sgml mode:
  182.  
  183.      <!-- -*- sgml -*- -->
  184.  
  185.    But remember that you can't have a comment before the *SGML
  186. declaration*.
  187.  
  188. 
  189. File: psgml.info,  Node: Entity manager,  Next: Validate,  Prev: Invoke,  Up: Top
  190.  
  191. The Entity Manager
  192. ******************
  193.  
  194.    SGML can refer to an external file (really entity) with an *external
  195. identifier*, this is a *public identifier* or a *system identifier*, or
  196. both.
  197.  
  198.    A typical public identifier looks like
  199.  
  200.      PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN"
  201.  
  202. where "ISO 8879:1986" is the owner, "ENTITIES" is the text class and
  203. "Added Latin 1" is the text description (and "EN" is language).
  204.  
  205.    A system identifier looks like
  206.  
  207.      SYSTEM "htmlplus.dtd"
  208.  
  209. where "htmlplus.dtd" is a system-specific identifier.
  210.  
  211.    To map external identifiers to file names, PSGML first searches
  212. entity catalog files and then search the list of file name templates in
  213. the variable `sgml-public-map'.
  214.  
  215.    The catalog format is according to SGML/Opens resolution on entity
  216. management.  The catalog consists of a series of entries and comments.
  217. A comment is delimited by `--' like in a markup declaration.  The entry
  218. types recognized are described in the following table.
  219.  
  220. `public PUBID FILE'
  221.      The FILE will be used for the entity text of an entity with the
  222.      public identifier PUBID.
  223.  
  224. `entity NAME FILE'
  225.      The FILE will be used for the entity text of an entity with the
  226.      name NAME.  If the NAME starts with a `%' the rest of the name
  227.      will be matched against parameter entities.
  228.  
  229. `doctype NAME FILE'
  230.      The FILE will be used for the entity text of an entity used as
  231.      external subset of a document declaration with NAME as document
  232.      type name.
  233.  
  234. `sgmldecl FILE'
  235.      Used to specify a default SGML declaration.  Recognized but not
  236.      used by PSGML other than to pass to an external validation command
  237.      (`sgml-validate-command').
  238.  
  239.    When PSGML is looking for the file containing an external entity, the
  240. following things will be tried in order:
  241.  
  242.   1. Try the system identifier, as a file name, if there is a system
  243.      identifier and the variable `sgml-system-identifiers-are-preferred'
  244.      is non-`nil' and there is no elements containing `%s' in
  245.      `sgml-public-map'.  If the system identifier is a relative file
  246.      name it will be relative to the directory containing the defining
  247.      entity.
  248.  
  249.   2. Look thru each catalog in `sgml-local-catalogs' and
  250.      `sgml-catalog-files' in order.  For each catalog look first for
  251.      entries matching the public identifier, if any.  Then look for
  252.      other matching entries in the order they appear in the catalog.
  253.  
  254.      Currently an entry will be ignored if it is matching but its file
  255.      is non-existent or unreadable.  (This is under reconsideration,
  256.      perhaps it should signal error instead).
  257.  
  258.   3. Try the system identifier, if any, as a file name.  If
  259.      `sgml-system-identifiers-are-preferred' is `nil' and there is no
  260.      elements containing `%s' in `sgml-public-map'.
  261.  
  262.   4. Try the entries in `sgml-public-map'.  Using the catalogs are
  263.      preferred.  The `sgml-public-map' may disappear in a future version
  264.      of PSGML (not soon though).
  265.  
  266.  
  267.    The `sgml-public-map' variable can contain a list of file name
  268. templates where `%P' will be substituted with the whole public
  269. identifier, owner is substituted for `%O', public text class for `%C',
  270. and public text description for `%D'.  The text class will be converted
  271. to lower case and the owner and description will be transliterated
  272. according to the variable `sgml-public-transliterations'.  The
  273. templates in the list is tried in order until an existing file is
  274. found.  The `sgml-public-map' is modeled after `sgmls' environment
  275. variable `SGML_PATH' and psgml understand the following substitution
  276. characters: %%, %N, %P, %S, %Y, %C, %L, %O, %T, and %V.  The the
  277. default value of `sgml-public-map' is taken from the environment
  278. variable `SGML_PATH'.
  279.  
  280.    Given the public identifier above and the file name template
  281. `/usr/local/lib/sgml/%o/%c/%d', the resulting file name is
  282.  
  283.      /usr/local/lib/sgml/ISO_8879:1986/entities/Added_Latin_1
  284.  
  285.    Note: blanks are transliterated to `_' (and also `/' to `%') and the
  286. text class is down cased.
  287.  
  288.  - User Option: sgml-catalog-files
  289.      This is a list of catalog entry files.  The files are in the
  290.      format defined in the SGML Open Draft Technical Resolution on
  291.      Entity Management.  The Emacs variable is initialized from the
  292.      environment variable `SGML_CATALOG_FILES' or if this variable is
  293.      undefined the default is
  294.  
  295.           ("CATALOG" "/usr/local/lib/sgml/CATALOG")
  296.  
  297.  - User Option: sgml-local-catalogs
  298.      A list of SGML entity catalogs to be searched first when parsing
  299.      the buffer.  This is used in addition to `sgml-catalog-files', and
  300.      `sgml-public-map'.  This variable is automatically local to the
  301.      buffer.
  302.  
  303.  - User Option: sgml-system-identifiers-are-preferred
  304.      If `nil', PSGML will look up external entities by searching the
  305.      catalogs in `sgml-local-catalogs' and `sgml-catalog-files' and
  306.      only if the entity is not found in the catalogs will a given system
  307.      identifier be used.  If the variable is non-nil and a system
  308.      identifier is given, the system identifier will be used for the
  309.      entity.  If no system identifier is given the catalogs will
  310.      searched.
  311.  
  312.  - User Option: sgml-public-map
  313.      This should be a list of file name templates.  This variable is
  314.      initialized from the environment variable `SGML_PATH'.  This is
  315.      the same environment variable that `sgmls' uses.  If the
  316.      environment variable is undefined the default is
  317.  
  318.           ("%S" "/usr/local/lib/sgml/%o/%c/%d")
  319.  
  320. 
  321. File: psgml.info,  Node: Validate,  Next: SGML declaration,  Prev: Entity manager,  Up: Top
  322.  
  323. Running an external SGML parser
  324. *******************************
  325.  
  326.    PSGML can not validate an SGML document (see below what it can and
  327. can't do).  If you have a validating SGML parser, like `sgmls', you can
  328. run the parser on your file with the command `C-c C-v'
  329. (`sgml-validate').
  330.  
  331.    Some variables control this function:
  332.  
  333.  - User Option: sgml-validate-command
  334.      The shell command to validate an SGML document.
  335.  
  336.      This is a `format' control string that by default should contain
  337.      two `%s' conversion specifications: the first will be replaced by
  338.      the value of `sgml-declaration' (or the empty string, if nil); the
  339.      second will be replaced by the current buffer's file name (or the
  340.      empty string, if nil).
  341.  
  342.      If `sgml-validate-files' is non-nil, the format string should
  343.      contain one `%s' conversion specification for each element of its
  344.      result.
  345.  
  346.      If sgml-validate-command is a list, then every element should be a
  347.      string.  The strings will be tried in order and `%'-sequences in
  348.      the string will be replaced according to the list below, if the
  349.      string contains `%'-sequences with no replacement value the next
  350.      string will be tried.
  351.  
  352.     `%b'
  353.           means the visited file of the current buffer
  354.  
  355.     `%s'
  356.           means the SGML declaration specified in the sgml-declaration
  357.           variable
  358.  
  359.     `%d'
  360.           means the file containing the DOCTYPE declaration, if not in
  361.           the buffer
  362.  
  363.      The default value is `nsgmls -s %s %s'.
  364.  
  365.  - User Option: sgml-validate-files
  366.      If non-nil, a function of no arguments that returns a list of file
  367.      names.  These file names will serve as the arguments to the
  368.      `sgml-validate-command' format control string instead of the
  369.      defaults.
  370.  
  371.  - User Option: sgml-declaration
  372.      The name of the SGML declaration file.
  373.  
  374.  - User Option: sgml-offer-save
  375.      If non-nil, `C-c C-v' (`sgml-validate') will ask about saving
  376.      modified buffers before running the validate command.  The default
  377.      value is `t'.
  378.  
  379.    The built-in parser can find some markup errors.  The command `C-c
  380. C-o' (`sgml-next-trouble-spot') is the best way to use the built-in
  381. parser for this.  To check the whole file go to the beginning of the
  382. buffer and use `C-c C-o'.
  383.  
  384.    Some of the markup errors not found are:
  385.  
  386.    * Errors in the SGML declaration.
  387.  
  388.    * Errors in attribute specifications.
  389.  
  390.    * Omitted start-tags for empty elements.
  391.  
  392. 
  393. File: psgml.info,  Node: SGML declaration,  Next: Managing the DTD,  Prev: Validate,  Up: Top
  394.  
  395. SGML Declaration
  396. ****************
  397.  
  398.    PSGML does not understand the SGML declaration, it accepts one in the
  399. file but it is ignored.  If you have the SGML declaration in another
  400. file you can make `sgmls' use it when you use the `C-c C-v'
  401. (`sgml-validate') command (*note Validate::.).
  402.  
  403.    PSGML has some options in what features it uses and what markup it
  404. creates.  You have to set these options to make PSGML's behavior
  405. consistent with your SGML declaration and personal preferences.
  406.  
  407.  - User Option: sgml-omittag
  408.      Set this to `t' if the SGML declaration has `OMITTAG YES' and to
  409.      `nil' otherwise.
  410.  
  411.  - User Option: sgml-shorttag
  412.      Set this to `t' if the SGML declaration has `SHORTTAG YES' and to
  413.      `nil' otherwise.
  414.  
  415.  - User Option: sgml-always-quote-attributes
  416.      If non-nil, quote all attribute values inserted after finishing
  417.      edit attributes.  If this variable is `nil' and `sgml-shorttag' is
  418.      non-`nil', attribute values that consists of only name characters
  419.      will not be quoted.
  420.  
  421.  - User Option: sgml-minimize-attributes
  422.      Determines minimization of attributes inserted by edit-attributes.
  423.      If non-nil, omit attribute name if the attribute value is from a
  424.      token group.  If `max', omit attributes with default value.
  425.      Minimization will only be done if they produce legal SGML (assuming
  426.      `sgml-omittag' and `sgml-shorttag' are set correctly).
  427.  
  428. 
  429. File: psgml.info,  Node: Managing the DTD,  Next: Edit,  Prev: SGML declaration,  Up: Top
  430.  
  431. Document Type Declaration
  432. *************************
  433.  
  434.    PSGML needs to know about the DTD you are using for many of its
  435. commands.  If you do not have a `DOCTYPE' declaration in your file,
  436. PSGML will try assume that there is one of the form
  437.  
  438.      <!DOCTYPE NAME SYSTEM>
  439.  
  440.    where NAME is the value of `sgml-default-doctype-name', if the value
  441. is non-`nil', else the GI of the first tag will be used.
  442.  
  443.    PSGML will try to parse the document type declaration the first time
  444. you do something that needs to parse the document or immediately if the
  445. variable `sgml-auto-activate-dtd' is `t'.  You can also initiate the
  446. parsing of the document type declaration with the command
  447. `sgml-parse-prolog'.  Big DTDs take some time to parse.
  448.  
  449.    When the DTD has been parsed or loaded the name of the document
  450. element will be displayed in the mode line inside brackets.  If there
  451. was an error parsing the DTD or there is no DTD, the mode line will
  452. display `[ANY]' (*** this is not really correct! a DTD will be
  453. established even if there are missing entities, it may even be empty).
  454.  
  455. * Menu:
  456.  
  457. * Precompiled DTD Subsets::
  458. * Using a Split Document::
  459. * Inserting a DOCTYPE::
  460. * Information from the DTD::
  461.  
  462. 
  463. File: psgml.info,  Node: Precompiled DTD Subsets,  Next: Using a Split Document,  Prev: Managing the DTD,  Up: Managing the DTD
  464.  
  465. Precompiled DTD Subsets
  466. =======================
  467.  
  468.    If parsing the DTD takes too long time you can arrange to have PSGML
  469. cache an internal complied version of the DTD.  Caching can be done of
  470. DTD fragments in favourable situations.  It is possible to have an
  471. external DTD subset cached but still have an internal DTD subset as long
  472. as the internal subset does not define parameter entities that affect
  473. the parsing of the external subset (*** what is the exact conditions?,
  474. probably you can't use the cached external subset if the internal subset
  475. defines parameter entities that are also defined in the external subset
  476. with another value).
  477.  
  478.    To enable caching you have to create special catalog files, hear
  479. after called ECAT files due to (temporary) lack of imagination.  These
  480. catalogs have similar syntax to the entity catalogs and there are two
  481. variables containing lists of catalogs to search: `sgml-ecat-files' and
  482. `sgml-local-ecat-files'.  The ECAT files can contain the following
  483. types of entries:
  484.  
  485. `file DTDFILE ENTITYDEF CFILE'
  486.      The DTDFILE is the name of a file containing a DTD subset that
  487.      should be cached in CFILE.  The ENTITYDEF is optional and if given
  488.      have the following syntax:
  489.           [ NAME1 LITERAL1 NAME2 LITERAL2 ... ]
  490.      Using ENTITYDEF will modify the DTD subset by defining the
  491.      parameter entity with name NAME1 to be LITERAL1, ....  The cached
  492.      version of the subset will be created with those entity
  493.      definitions, and when PSGML search for a matching cached subset
  494.      will check that the parameter entities in ENTITYDEF has been
  495.      defined with those values before trying to use `cfile'.
  496.  
  497. `public PUBID ENTITYDEF CFILE'
  498.      Cache the DTD subset with public identifier PUBID in file CFILE.
  499.  
  500.  - User Option: sgml-recompile-out-of-date-cdtd
  501.      If non-`nil', out of date compiled DTDs will be automatically
  502.      recompiled.  If the value is `ask', PSGML will ask before
  503.      recompiling.  A `nil' value will cause PSGML to silently load an
  504.      out of date compiled DTD.  A DTD that refers to undefined external
  505.      entities is always out of date, thus in such case it can be useful
  506.      to set this variable to `nil'.
  507.  
  508.    Previous versions of PSGML have had another way of speeding up DTD
  509. parsing.  This code remains in this version of PSGML, but is not
  510. actively maintained and may disappear in the future.
  511.  
  512.    You can save the parsed DTD in a file using the command `M-x
  513. sgml-save-dtd'.  Next time PSGML can load that file instead of parsing
  514. the DTD.  For PSGML to find the saved DTD you must either save the DTD
  515. using the default name or do a `M-x sgml-save-options' after saving the
  516. DTD.  To directly use an already parsed and saved DTD, load the file
  517. containing the saved DTD with the command `M-x sgml-load-dtd'.
  518.  
  519.  - User Option: sgml-default-dtd-file
  520.      This is the default file name for saved DTD.  This is set by
  521.      `sgml-mode' to the buffer file name less extension plus the
  522.      extension `.ced', if that file exists.  Can be changed in the Local
  523.      variables section of the file.
  524.  
  525. 
  526. File: psgml.info,  Node: Using a Split Document,  Next: Inserting a DOCTYPE,  Prev: Precompiled DTD Subsets,  Up: Managing the DTD
  527.  
  528. Using a Split Document
  529. ======================
  530.  
  531.    You can have the `DOCTYPE' declaration in another file by setting
  532. `sgml-doctype' to the other file.
  533.  
  534.  - User Option: sgml-parent-document
  535.      Used when the current file is part of a bigger document.
  536.  
  537.      The variable describes how the current file's content fit into the
  538.      element hierarchy.  The variable should have the form
  539.  
  540.           (PARENT-FILE CONTEXT-ELEMENT* TOP-ELEMENT (HAS-SEEN-ELEMENT*)?)
  541.  
  542.     PARENT-FILE
  543.           is a string, the name of the file containing the document
  544.           entity.
  545.  
  546.     CONTEXT-ELEMENT
  547.           is a string, that is the name of an element type.  It can
  548.           occur 0 or more times and is used to set up exceptions and
  549.           short reference map.  Good candidates for these elements are
  550.           the elements open when the entity pointing to the current
  551.           file is used.
  552.  
  553.     TOP-ELEMENT
  554.           is a string that is the name of the element type of the top
  555.           level element in the current file.  The file should contain
  556.           one instance of this element, unless the last (lisp) element
  557.           of sgml-parent-document is a list.  If it is a list, the top
  558.           level of the file should follow the content model of
  559.           top-element.
  560.  
  561.     HAS-SEEN-ELEMENT
  562.           is a string that is the name of an element type.  This
  563.           element is satisfied in the content model of top-element.
  564.  
  565. 
  566. File: psgml.info,  Node: Inserting a DOCTYPE,  Next: Information from the DTD,  Prev: Using a Split Document,  Up: Managing the DTD
  567.  
  568. Inserting a DOCTYPE
  569. ===================
  570.  
  571.    *** Describe the DTD menu in general.  Describe customized entries
  572. for special DTDs.  Mention `C-c C-u C-d' for inserting a DOCTYPE from
  573. keyboard.
  574.  
  575.    If you change the doctype you must execute `sgml-parse-prolog',
  576. changes in the doctype are not automatically recognized.
  577.  
  578.  - User Option: sgml-custom-dtd
  579.      Menu entries to be added to the DTD menu.  The value should be a
  580.      list of entries to be added to the DTD menu.
  581.  
  582.      Every entry should be a list.  The first element of the entry is a
  583.      string used as the menu entry.  The second element is a string
  584.      containing a doctype declaration (this can be nil if no doctype).
  585.      The rest of the list should be a list of variables and values.
  586.      For backward compatibility a single string instead of a variable
  587.      is assigned to `sgml-default-dtd-file'.  All variables are made
  588.      buffer local and are also added to the buffers local variables
  589.      list.
  590.  
  591.      When an entry is selected from the DTD menu, the doctype
  592.      declaration will be inserted, the variables will be set to the
  593.      values in the entry and a local variables list will be created in
  594.      the buffer.
  595.  
  596.      Example:
  597.  
  598.              (("HTML" nil
  599.                sgml-default-dtd-file "~/sgml/html.ced"
  600.                sgml-omittag nil sgml-shorttag nil)
  601.               ("HTML+" "<!doctype htmlplus system 'htmlplus.dtd'>"
  602.                "~/sgml/htmlplus.ced"
  603.                sgml-omittag t sgml-shorttag nil)
  604.               ("DOCBOOK" "<!doctype docbook system 'docbook.dtd'>"
  605.                "~/sgml/docbook.ced"
  606.                sgml-omittag nil sgml-shorttag t)))
  607.  
  608. 
  609. File: psgml.info,  Node: Information from the DTD,  Prev: Inserting a DOCTYPE,  Up: Managing the DTD
  610.  
  611. Information from the DTD
  612. ========================
  613.  
  614.    PSGML can list various information about the current DTD.  The
  615. following commands can be used via `M-x' and can also be found in the
  616. DTD menu.
  617.  
  618. `sgml-general-dtd-info'
  619.      Display information about the current DTD.
  620.  
  621. `sgml-describe-element-type'
  622.      Describe the properties of an element type as declared in the
  623.      current DTD.
  624.  
  625. `sgml-describe-entity'
  626.      Describe the properties of an entity as declared in the current
  627.      DTD.
  628.  
  629. `sgml-list-elements'
  630.      Will list all elements and the attributes declared for the element.
  631.  
  632. `sgml-list-attributes'
  633.      Will list all attributes declared and the elements that use them.
  634.  
  635. `sgml-list-terminals'
  636.      Will list all elements that can contain data.
  637.  
  638. `sgml-list-occur-in-elements'
  639.      Will list all element types and where it can occur.
  640.  
  641. `sgml-list-content-elements'
  642.      Will list all element types and the element types that can occur
  643.      in its content.
  644.  
  645. 
  646. File: psgml.info,  Node: Edit,  Next: Display,  Prev: Managing the DTD,  Up: Top
  647.  
  648. Commands for editing
  649. ********************
  650.  
  651. * Menu:
  652.  
  653. * Insert::                      Inserting Markup
  654. * Complete::                    Markup completion
  655. * Information::                 Showing information
  656. * Indent::                      Indentation according to structure
  657. * Move::                        Move in the element structure
  658. * Attributes::                  Editing attributes
  659. * Change and delete::           Changing and deleting markup
  660. * Translating characters and entities::
  661.  
  662. 
  663. File: psgml.info,  Node: Insert,  Next: Complete,  Prev: Edit,  Up: Edit
  664.  
  665. Inserting Markup
  666. ================
  667.  
  668.    The commands that insert start-tags works only if the document has an
  669. associated DTD.
  670.  
  671.    Keyboard commands for inserting:
  672.  
  673. `C-c <'
  674.      Will ask, for the tag to insert, in the mini-buffer with
  675.      completion on the tags that are valid at point (`sgml-insert-tag').
  676.  
  677.      If the option `sgml-balanced-tag-edit' is non-nil, inserting a
  678.      start-tag will also insert the corresponding end-tag.  If, in
  679.      addition, `sgml-auto-insert-required-elements' is non-nil, tags
  680.      for elements required between the inserted tags will also be
  681.      inserted.
  682.  
  683.      The list of valid tags, computed for a position in the buffer, will
  684.      contain:
  685.  
  686.        1. The end-tag for the current element, if it can be ended at
  687.           the position and `sgml-balanced-tag-edit' is nil.
  688.           Furthermore it will contain end-tags for enclosing elements
  689.           if the necessary omissible end-tag declarations have been
  690.           made in the DTD.
  691.  
  692.        2. The start-tags of all elements that could occur after point.
  693.           If `sgml-omittag-transparent' is nil, the above will be
  694.           limited to the elements that can occur within the current
  695.           element.
  696.  
  697. `C-c C-e'
  698.      Insert start and end-tags for an element (`sgml-insert-element').
  699.      The name of the element is read from the mini-buffer with
  700.      completion on valid elements.  If
  701.      `sgml-insert-end-tag-on-new-line' is non-nil or the element has
  702.      element content, the end-tag will be inserted on a new line after
  703.      the start-tag.
  704.  
  705.      If `sgml-omittag-transparent' is nil, the list of valid elements
  706.      will only contain the elements that can be in the content of the
  707.      current element.
  708.  
  709.      Required elements in the content will be automatically inserted if
  710.      the option `sgml-auto-insert-required-elements' is non-nil.  When
  711.      the content model demands an element but there is more than one to
  712.      choose from, a comment can be inserted with the available choices
  713.      if the option `sgml-insert-missing-element-comment' is non-nil.
  714.  
  715. `C-c C-r'
  716.      Makes the region into a new element (`sgml-tag-region').  Reads
  717.      element name from mini-buffer with completion as for `C-c C-e'.
  718.  
  719. `C-c /'
  720.      Inserts an end-tag for the current element (`sgml-insert-end-tag').
  721.  
  722. `C-c RET'
  723.      Split the current element at point.  If repeated, the containing
  724.      element will be split before the beginning of then current element.
  725.  
  726.      Typical use is to start a new paragraph element when inside a
  727.      paragraph.
  728.  
  729. `C-c +'
  730.      Read attribute name and value from mini-buffer and insert attribute
  731.      specification (`sgml-insert-attribute').  If point is immediately
  732.      after a start-tag, this command operates on that start-tag.
  733.      Otherwise the command will operate on the element after point.
  734.  
  735.      The attribute name will be read with completion.  If the attribute
  736.      has a token list as declared value the attribute value will also
  737.      be read with completion.  The prompt for attribute value will
  738.      typically look like:
  739.  
  740.           Value for ATTRIBUTE (TYPE Default: CURRENT VALUE):
  741.  
  742. `C-c C-u C-m'
  743.      Give keyboard access to the customized part of the Markup menu.
  744.      Emacs will prompt for the markup to insert using the menu line as
  745.      selector. (See SGML-CUSTOM-MARKUP below.)
  746.  
  747.    Menu bar:
  748.  
  749. `Markup'
  750.      Selecting from this menu will insert markup.  The menu contains
  751.      sub menus with tags and with entities, some other markup and a user
  752.      defined section.
  753.  
  754.      Sub menus:
  755.  
  756. `Insert element'
  757.      Pops up a menu of valid elements and insert start and end-tags for
  758.      the selected element.  Selections from the menu works like the `C-c
  759.      C-e' command.
  760.  
  761. `Insert start-tag'
  762.      Pops up a menu of valid start-tags and insert the selected tag.
  763.      The menu has the same start-tags as the completion list for `C-c
  764.      <'.
  765.  
  766. `Insert end-tag'
  767.      Pops up a menu of valid end-tags and insert the selected tag.
  768.  
  769. `Tag region'
  770.      Pops up a menu of valid elements and tag the region with the
  771.      selection.  Selections from the menu works like the `C-c C-r'
  772.      command.
  773.  
  774. `Insert entity'
  775.      Menu of all general entities defined in the DTD.
  776.  
  777. `Insert attribute'
  778.      Pops up a menu with all the attributes of an element.  The element
  779.      is either the one which start-tag is immediately before point or
  780.      the element after point.  Selecting from this menu edits the
  781.      attribute specification list for the element.
  782.  
  783.      The menu has a sub menu for every attribute which declared value
  784.      is a token list.  The rest of the attributes are collected in one
  785.      sub menu.  For the token list attributes, selecting a value will
  786.      insert that attribute-value pair.  Selecting some other attribute
  787.      reads the attribute-value from the mini-buffer and inserts the
  788.      attribute value pair.
  789.  
  790.    A menu is also available directly with a mouse button click in the
  791. buffer.  In GNU Emacs it is the first mouse button combined with shift
  792. (`S-<mouse-1>').  In XEmacs it is bound to the third mouse button.  The
  793. mouse button click will pop-up a menu of valid tags or a menu of
  794. attributes if the point is in a start-tag.  The attributes menu works
  795. as the "Insert attribute" menu from the menu-bar.  The tags list is the
  796. list of valid tags described above for command `C-c <'.  Selection from
  797. the tags menu works like the `C-c <' command, with the following
  798. exception:
  799.  
  800.    You can tag a region, with start and end-tag.  There are two ways to
  801. indicate the region to mark:
  802.  
  803.   1. Use the normal mouse commands to mark region.
  804.  
  805.      For this to work you must either use "transient mark mode" (*note
  806.      Transient Mark Mode: (emacs)Transient Mark.) or set the option
  807.      `sgml-tag-region-if-active' to non-nil (don't set this unless you
  808.      are sure that you want it).
  809.  
  810.   2. Alternatively make a secondary selection, this is done by holding
  811.      down the meta key and using the mouse buttons.  *Note Secondary
  812.      selection: (emacs)Secondary selection.  Some window managers
  813.      intercept these events, which makes it hard use the secondary
  814.      selection in Emacs.
  815.  
  816.  - User Option: sgml-balanced-tag-edit
  817.      If non-nil, inserting a start-tag will also insert the
  818.      corresponding end-tag.
  819.  
  820.  - User Option: sgml-auto-insert-required-elements
  821.      If non-nil, automatically inserts required elements in the content
  822.      of an inserted element.
  823.  
  824.  - User Option: sgml-omittag-transparent
  825.      If non-nil, will show legal tags inside elements with omissible
  826.      start-tags and legal tags beyond omissible end-tags.
  827.  
  828.  - User Option: sgml-tag-region-if-active
  829.      If non-nil, the `Insert tags' menu will tag a region if the region
  830.      is considered active by emacs.  If nil, region must be active and
  831.      `transient-mark-mode' must be on for the region to be tagged.
  832.  
  833.  - User Option: sgml-custom-markup
  834.      Menu entries to be added to the Markup menu.  The value should be
  835.      a list of lists of two strings.  The first string is the menu line
  836.      and the second string is the text inserted when the menu item is
  837.      selected.  The second string can contain a `\r' where the cursor
  838.      should be left.  Also, if a selection is made according to the
  839.      same rules as for the `S-mouse-1' menu, the selection is replaced
  840.      with the second string and `\r' is replaced with the selection.
  841.  
  842.      Example:
  843.  
  844.             (("Version1" "<![%Version1[\r]]>")
  845.              ("New page"  "<?NewPage>"))
  846.  
  847.  - User Option: sgml-insert-missing-element-comment
  848.      If non-nil, and sgml-auto-insert-required-elements also true,
  849.      `sgml-insert-element' will insert a comment if there is an element
  850.      required but there is more than one to choose from.
  851.  
  852.  - User Option: sgml-insert-end-tag-on-new-line
  853.      If non-nil, `sgml-insert-element' will put the end-tag on a new
  854.      line after the start-tag.  Useful on slow terminals if you find
  855.      the end-tag after the cursor irritating.
  856.  
  857. 
  858. File: psgml.info,  Node: Complete,  Next: Information,  Prev: Insert,  Up: Edit
  859.  
  860. Markup completion
  861. =================
  862.  
  863.    If you are typing in markup directly, `M-TAB' will help you by
  864. completing a tag name, an entity name or a markup declaration name.  If
  865. you type `M-TAB' after a plain word, `ispell-complete-word' will be
  866. invoked instead.
  867.  
  868.    If you have typed (-!- marks the position of point)
  869.  
  870.      &At-!-
  871.  
  872. and type `M-TAB' (assuming you use the `ISOLat1' entity set) you get:
  873.  
  874.      Ã-!-
  875.  
  876. 
  877. File: psgml.info,  Node: Information,  Next: Indent,  Prev: Complete,  Up: Edit
  878.  
  879. Showing information
  880. ===================
  881.  
  882.    Commands for showing information obtained by parsing the buffer.
  883.  
  884. `C-c C-c'
  885.      Shows in the message area: context at point, if in a tag or in
  886.      mixed content and the open elements (`sgml-show-context').
  887.  
  888. `C-c C-w'
  889.      Shows what element the character after point (under the cursor)
  890.      belongs to; also shows context of element (`sgml-what-element').
  891.  
  892. `C-c C-t'
  893.      List contextually valid tags (`sgml-list-valid-tags').  Displays
  894.      information about current element, all valid end-tags, valid
  895.      start-tags in current element, and start-tags valid at this point
  896.      but in other elements together with the tags omitted.
  897.  
  898.    You can make the mode-line display the name of the current open
  899. element by setting the `sgml-live-element-indicator' variable.  Setting
  900. this will make all commands slower due to the work needed to keep the
  901. mode-line up to date.
  902.  
  903.  - User Option: sgml-live-element-indicator
  904.      If non-nil, indicate current element in mode line.
  905.  
  906.      NOTE: Setting this implies that every command can cause a parse.
  907.  
  908. 
  909. File: psgml.info,  Node: Indent,  Next: Move,  Prev: Information,  Up: Edit
  910.  
  911. Indentation according to structure
  912. ==================================
  913.  
  914.    You can indent a line according to the depth of element nesting at
  915. the beginning of the line.  To indent the current line use `<TAB>'.
  916. You can also use `<LFD>' (`newline-and-indent') to start a new line
  917. with correct indentation.
  918.  
  919.  - User Option: sgml-indent-step
  920.      How much to increment indent for every element level.  If nil, no
  921.      indentation.
  922.  
  923.      If this is nil, `<TAB>' will insert a tab instead of indenting.
  924.  
  925.  - User Option: sgml-indent-data
  926.      If non-nil, indent in data/mixed context also.
  927.  
  928. 
  929. File: psgml.info,  Node: Move,  Next: Attributes,  Prev: Indent,  Up: Edit
  930.  
  931. Move in the element structure
  932. =============================
  933.  
  934.    These commands move in the element structure.  The commands uses
  935. knowledge of SGML syntax, and if available the specific DTD.
  936.  
  937. `C-M-a'
  938.      Move to the (content) beginning of the current element
  939.      (`sgml-beginning-of-element').
  940.  
  941. `C-M-e'
  942.      Move to the (content) end of the current element
  943.      (`sgml-end-of-element').
  944.  
  945. `C-M-f'
  946.      Move forward by element (`sgml-forward-element').
  947.  
  948. `C-M-b'
  949.      Move backward by element (`sgml-backward-element').
  950.  
  951. `C-M-u'
  952.      Move up to before current element (`sgml-backward-up-element').
  953.  
  954. `C-c C-n'
  955.      Move up to after current element (`sgml-up-element').
  956.  
  957. `C-M-d'
  958.      Move down to the (content) beginning of the next element
  959.      (`sgml-down-element').
  960.  
  961. `C-c C-d'
  962.      Move to the next place where data is allowed
  963.      (`sgml-next-data-field').
  964.  
  965.    You can also move to the next place where there is some structural
  966. error with `C-c C-o' (*note Validate::.).
  967.  
  968. 
  969. File: psgml.info,  Node: Attributes,  Next: Change and delete,  Prev: Move,  Up: Edit
  970.  
  971. Editing attributes
  972. ==================
  973.  
  974.    If you want to change the attributes of a start-tag you can simply
  975. edit them directly in the buffer.  Or you can place the cursor at or
  976. after the start-tag and use the `sgml-edit-attributes' command,
  977. available from the `SGML'-menu or on `C-c C-a'.  This will create a new
  978. Emacs window with all possible attributes listed in the form
  979.  
  980.      ATTRIBUTE NAME = CURRENT VALUE.
  981.  
  982.    The CURRENT VALUE may be shown as `#DEFAULT' if the attribute has
  983. not been given a value in the start-tag.  The list also contains the
  984. attributes declaration as a comment.  Note also that the CURRENT VALUE
  985. is show without eventual quotes.
  986.  
  987.    It is now possible to edit the attribute values.  You can move to the
  988. next attribute with `<TAB>'.  If you want to let an attribute have its
  989. default value use `C-c C-d', this will insert a `#DEFAULT' in the value
  990. field.
  991.  
  992.    If Emacs is running in an X window, the `#DEFAULT' will be
  993. underlined to distinguish it from normal values.
  994.  
  995.    Finish the editing with `C-c C-c'; this will replace the attribute
  996. values in the main buffer with those edited.  Note that values will be
  997. quoted as needed.
  998.  
  999.    If you want to abort the editing, you can remove the window with
  1000. `C-x 0' or if you want it neat, kill the buffer and remove the window.
  1001.  
  1002.    Some other keys are:
  1003. `C-a'
  1004.      Go to the beginning of the value field
  1005.      (`sgml-edit-attrib-field-start').
  1006.  
  1007. `C-e'
  1008.      Go to the end of the value field (`sgml-edit-attrib-field-end').
  1009.  
  1010. `C-c C-k'
  1011.      Clear the value field (`sgml-edit-attrib-clear').
  1012.  
  1013. `C-c C-d'
  1014.      Set the value field to `#DEFAULT' (`sgml-edit-attrib-default').
  1015.      This is a special value that will make the attribute be implied.
  1016.  
  1017. 
  1018. File: psgml.info,  Node: Change and delete,  Next: Translating characters and entities,  Prev: Attributes,  Up: Edit
  1019.  
  1020. Changing and deleting markup
  1021. ============================
  1022.  
  1023. `C-c ='
  1024.      Change the name of the current element
  1025.      (`sgml-change-element-name').  Tries to translate attribute
  1026.      specifications.  An attribute will be translated to an attribute
  1027.      with the same name.  If the new element has no attribute with the
  1028.      same name, the attribute will be ignored.  If there is an
  1029.      attribute with the same name but different declared content, a
  1030.      warning is given.
  1031.  
  1032.      ID attributes are handled specially, an attribute with declared
  1033.      value ID will always be translated to the attribute with declared
  1034.      value ID.
  1035.  
  1036. `C-c C-k'
  1037.      Kill next tag, markup declaration or process instruction
  1038.      (`sgml-kill-markup').
  1039.  
  1040. `C-M-k'
  1041.      Kill the element following the cursor (`sgml-kill-element').
  1042.  
  1043. `C-c -'
  1044.      Remove tags from current element (`sgml-untag-element').
  1045.  
  1046. `C-c #'
  1047.      Convert character after point to a character reference
  1048.      (`sgml-make-character-reference').  If called with a numeric
  1049.      argument, convert a character reference back to a normal character.
  1050.  
  1051. `C-c C-q'
  1052.      Fills an element as a paragraph (`sgml-fill-element').  This is a
  1053.      substitute for the normal `fill-paragraph'.  The command uses
  1054.      heuristics to decide what should be a paragraph.
  1055.  
  1056.        1. If point is in an element content, recursively fill the
  1057.           sub-elements.
  1058.  
  1059.        2. Find the biggest element with mixed content containing point.
  1060.  
  1061.        3. If the above element is mixed but contains elements with pure
  1062.           element content then fill what is between the pure elements
  1063.           as paragraphs and fill the pure elements recursively.
  1064.  
  1065. `M-x sgml-expand-all-shortrefs'
  1066.      Short references to text entities are expanded to the replacement
  1067.      text of the entity other short references are expanded into
  1068.      general entity references.  If argument, TO-ENTITY, is non-`nil',
  1069.      or if called interactive with numeric prefix argument, all short
  1070.      references are replaced by generally entity references.
  1071.  
  1072. `M-x sgml-normalize'
  1073.      Normalize the document in the buffer.  This will
  1074.  
  1075.        1. expand short references,
  1076.  
  1077.        2. insert missing tags,
  1078.  
  1079.        3. replace minimized tags with full tags,
  1080.  
  1081.        4. fix attribute specification lists according to options set.
  1082.  
  1083.      There is one argument, TO-ENTITY, with the same meaning as for
  1084.      `sgml-expand-all-shortrefs'.
  1085.  
  1086.      There is one option for the normalize command.  With its default
  1087.      value, normalize may actually change the data content of some
  1088.      elements.  But only by removing some white-space from the end of
  1089.      elements with omitted end-tags.
  1090.  
  1091.  - User Option: sgml-normalize-trims
  1092.      If non-nil, `sgml-normalize' will trim off white space from end of
  1093.      element when adding end-tag.
  1094.  
  1095.      Default: `t'.
  1096.  
  1097. 
  1098. File: psgml.info,  Node: Translating characters and entities,  Prev: Change and delete,  Up: Edit
  1099.  
  1100. Translating between characters and entity references
  1101. ====================================================
  1102.  
  1103.    Set the variable `sgml-display-char-list-filename' to a file file
  1104. that contains mappings between all characters present in the
  1105. presentation character set, and their "standard replacement text"
  1106. names, e.g. "σ" -> "[aring ]", e.t.c.
  1107.  
  1108.    The default value for this variable is `iso88591.map'.
  1109.  
  1110.    The use the functions (also in the Modify menu)
  1111.  
  1112. `sgml-charent-to-display-char'
  1113.  
  1114. `sgml-display-char-to-charent'
  1115.    to translate between entities and characters.
  1116.  
  1117. 
  1118. File: psgml.info,  Node: Display,  Next: Miscellaneous options,  Prev: Edit,  Up: Top
  1119.  
  1120. Appearance of text in the buffer
  1121. ********************************
  1122.  
  1123. * Menu:
  1124.  
  1125. * Fold::                        Folding editing
  1126. * Hiding markup::
  1127. * Highlight::                   Highlighting markup
  1128.  
  1129. 
  1130. File: psgml.info,  Node: Fold,  Next: Hiding markup,  Prev: Display,  Up: Display
  1131.  
  1132. Folding editing
  1133. ===============
  1134.  
  1135.    With these commands you can make parts of the text temporarily
  1136. invisible to make it easier to see the overall structure of your text.
  1137.  
  1138.    When folding a region all the lines but the first will be invisible.
  1139. The first line of the region will still be visible with an ellipsis at
  1140. the end.
  1141.  
  1142.    *Note Outline Mode: (emacs)Outline Mode.
  1143.  
  1144. `C-c C-f C-r'
  1145.      The region between point and mark will be folded
  1146.      (`sgml-fold-region').
  1147.  
  1148. `C-c C-f C-e'
  1149.      The region between the start and end of the current element will be
  1150.      folded (`sgml-fold-element').
  1151.  
  1152.      This command can also fold the SGML declaration or the DOCTYPE
  1153.      declaration.
  1154.  
  1155. `C-c C-f C-s'
  1156.      Fold all the sub elements of the current element
  1157.      (`sgml-fold-subelement').
  1158.  
  1159. `C-c C-s'
  1160. `C-c C-u C-l'
  1161.      Unfold the current line, assuming it is the first line of a folded
  1162.      region (`sgml-unfold-line').
  1163.  
  1164. `C-c C-u C-e'
  1165.      Make all lines in current element visible (`sgml-unfold-element').
  1166.  
  1167. `C-c C-u C-a'
  1168.      Make all lines in current buffer visible (`sgml-unfold-all').
  1169.  
  1170. `C-c C-f C-x'
  1171.      Unfold current element and then fold the subelements
  1172.      (`sgml-expand-element').  If the current element is folded this
  1173.      expands what is visible.
  1174.  
  1175. 
  1176. File: psgml.info,  Node: Hiding markup,  Next: Highlight,  Prev: Fold,  Up: Display
  1177.  
  1178. Hiding markup
  1179. =============
  1180.  
  1181.    *** Describe hide-tags
  1182.  
  1183. 
  1184. File: psgml.info,  Node: Highlight,  Prev: Hiding markup,  Up: Display
  1185.  
  1186. Highlighting markup
  1187. ===================
  1188.  
  1189.    PSGML can highlight the markup giving the markup a different "face"
  1190. (*note Using Multiple Typefaces: (emacs)Faces.).  The highlighting will
  1191. only be done if the variable `sgml-set-face' is non-`nil'.  The default
  1192. settings make tags bold and comments italic, but this can be modified
  1193. with the variable `sgml-markup-faces'.  When highlighting is on PSGML
  1194. will parse after every command until the whole buffer has been parsed
  1195. or user event occurs.
  1196.  
  1197.    To remove the highlighting type `M-x sgml-clear-faces'.
  1198.  
  1199.  - User Option: sgml-set-face
  1200.      If non-nil, psgml will set the face of parsed markup.
  1201.  
  1202.  - User Option: sgml-markup-faces
  1203.      A list of markup to face mappings.  Each element looks like
  1204.      `(MARKUP-TYPE . FACE)'.  Possible values for MARKUP-TYPE is:
  1205.  
  1206.     `comment'
  1207.           comment declaration
  1208.  
  1209.     `doctype'
  1210.           doctype declaration
  1211.  
  1212.     `end-tag'
  1213.           end-tag
  1214.  
  1215.     `ignored'
  1216.           ignored marked section
  1217.  
  1218.     `ms-start'
  1219.           marked section end, if not ignored
  1220.  
  1221.     `ms-end'
  1222.           marked section start, if not ignored
  1223.  
  1224.     `pi'
  1225.           processing instruction
  1226.  
  1227.     `sgml'
  1228.           SGML declaration
  1229.  
  1230.     `start-tag'
  1231.           start-tag
  1232.  
  1233.     `entity'
  1234.           entity reference
  1235.  
  1236.     `shortref'
  1237.           short reference
  1238.  
  1239. 
  1240. File: psgml.info,  Node: Miscellaneous options,  Next: Bugs,  Prev: Display,  Up: Top
  1241.  
  1242. Miscellaneous options
  1243. *********************
  1244.  
  1245.    *** describe sgml-save-options
  1246.  
  1247.  - User Option: sgml-ignore-undefined-elements
  1248.      Start-tags for undefined elements will either be ignored, if
  1249.      `sgml-ignore-undefined-elements' is `t', or assumed to be
  1250.      acceptable in the current element and defined with `O O ANY'
  1251.  
  1252.  - User Option: sgml-range-indicator-max-length
  1253.      Maximum number of characters used from the first and last entry of
  1254.      a sub-menu to indicate the range of that menu.
  1255.  
  1256.      This is used for long menus of elements, tags or entities that are
  1257.      split into `sgml-max-menu-size' big sub-menus.
  1258.  
  1259. 
  1260. File: psgml.info,  Node: Bugs,  Next: Index,  Prev: Miscellaneous options,  Up: Top
  1261.  
  1262. Bugs
  1263. ****
  1264.  
  1265.    If you encounter something that you think is a bug, please report
  1266. it.  Try to include a clear description of the undesired behaviour.  A
  1267. test case that exhibits the bug, would also be useful.
  1268.  
  1269.    You can report a bug with the command `M-x sgml-submit-bug-report'.
  1270.  
  1271.    When PSGML needs contextual information it parses the document up to
  1272. the point.  During the parsing, it builds a parse tree.  The parse tree
  1273. is used to initialize the next parse, to avoid having to parse things
  1274. already parsed.  Changes to the buffer is supposed to prune the tree of
  1275. all outdated information.  But if you get strange complaints from the
  1276. parser, try and back up a bit and use `C-c C-o'
  1277. (`sgml-next-trouble-spot').
  1278.  
  1279. 
  1280. File: psgml.info,  Node: Index,  Prev: Bugs,  Up: Top
  1281.  
  1282. Index
  1283. *****
  1284.  
  1285. * Menu:
  1286.  
  1287. * <LFD>:                                 Indent.
  1288. * <TAB> <1>:                             Attributes.
  1289. * <TAB>:                                 Indent.
  1290. * C-a:                                   Attributes.
  1291. * C-c #:                                 Change and delete.
  1292. * C-c +:                                 Insert.
  1293. * C-c -:                                 Change and delete.
  1294. * C-c /:                                 Insert.
  1295. * C-c <:                                 Insert.
  1296. * C-c =:                                 Change and delete.
  1297. * C-c C-a:                               Attributes.
  1298. * C-c C-c <1>:                           Attributes.
  1299. * C-c C-c:                               Information.
  1300. * C-c C-d <1>:                           Attributes.
  1301. * C-c C-d:                               Move.
  1302. * C-c C-e:                               Insert.
  1303. * C-c C-f C-e:                           Fold.
  1304. * C-c C-f C-r:                           Fold.
  1305. * C-c C-f C-s:                           Fold.
  1306. * C-c C-f C-x:                           Fold.
  1307. * C-c C-k <1>:                           Change and delete.
  1308. * C-c C-k:                               Attributes.
  1309. * C-c C-n:                               Move.
  1310. * C-c C-o:                               Validate.
  1311. * C-c C-q:                               Change and delete.
  1312. * C-c C-r:                               Insert.
  1313. * C-c C-s:                               Fold.
  1314. * C-c C-t:                               Information.
  1315. * C-c C-u C-a:                           Fold.
  1316. * C-c C-u C-d:                           Inserting a DOCTYPE.
  1317. * C-c C-u C-e:                           Fold.
  1318. * C-c C-u C-l:                           Fold.
  1319. * C-c C-u C-m:                           Insert.
  1320. * C-c C-v:                               Validate.
  1321. * C-c C-w:                               Information.
  1322. * C-c RET:                               Insert.
  1323. * C-e:                                   Attributes.
  1324. * C-M-a:                                 Move.
  1325. * C-M-b:                                 Move.
  1326. * C-M-d:                                 Move.
  1327. * C-M-e:                                 Move.
  1328. * C-M-f:                                 Move.
  1329. * C-M-k:                                 Change and delete.
  1330. * C-M-u:                                 Move.
  1331. * CONCUR:                                Introduction.
  1332. * DATATAG:                               Introduction.
  1333. * DOCTYPE:                               Managing the DTD.
  1334. * DTD <1>:                               Information from the DTD.
  1335. * DTD:                                   Managing the DTD.
  1336. * Element:                               Information from the DTD.
  1337. * entity:                                Information from the DTD.
  1338. * entity catalog:                        Entity manager.
  1339. * external identifier:                   Entity manager.
  1340. * invoke:                                Invoke.
  1341. * LINK:                                  Introduction.
  1342. * M-TAB:                                 Complete.
  1343. * major mode:                            Invoke.
  1344. * newline-and-indent:                    Indent.
  1345. * OMITTAG:                               SGML declaration.
  1346. * public identifier:                     Entity manager.
  1347. * RANK:                                  Introduction.
  1348. * S-<mouse-1>:                           Insert.
  1349. * SGML Declaration:                      Introduction.
  1350. * sgml-always-quote-attributes:          SGML declaration.
  1351. * sgml-auto-activate-dtd:                Managing the DTD.
  1352. * sgml-auto-insert-required-elements:    Insert.
  1353. * sgml-backward-element:                 Move.
  1354. * sgml-backward-up-element:              Move.
  1355. * sgml-balanced-tag-edit:                Insert.
  1356. * sgml-beginning-of-element:             Move.
  1357. * sgml-catalog-files:                    Entity manager.
  1358. * sgml-change-element-name:              Change and delete.
  1359. * sgml-charent-to-display-char:          Translating characters and entities.
  1360. * sgml-clear-faces:                      Highlight.
  1361. * sgml-complete:                         Complete.
  1362. * sgml-custom-dtd:                       Inserting a DOCTYPE.
  1363. * sgml-custom-markup:                    Insert.
  1364. * sgml-declaration:                      Validate.
  1365. * sgml-default-doctype-name:             Managing the DTD.
  1366. * sgml-default-dtd-file:                 Precompiled DTD Subsets.
  1367. * sgml-describe-element-type:            Information from the DTD.
  1368. * sgml-describe-entity:                  Information from the DTD.
  1369. * sgml-display-char-to-charent:          Translating characters and entities.
  1370. * sgml-doctype:                          Using a Split Document.
  1371. * sgml-down-element:                     Move.
  1372. * sgml-ecat-files:                       Precompiled DTD Subsets.
  1373. * sgml-edit-attrib-clear:                Attributes.
  1374. * sgml-edit-attrib-default:              Attributes.
  1375. * sgml-edit-attrib-field-end:            Attributes.
  1376. * sgml-edit-attrib-field-start:          Attributes.
  1377. * sgml-edit-attributes:                  Attributes.
  1378. * sgml-end-of-element:                   Move.
  1379. * sgml-expand-all-shortrefs:             Change and delete.
  1380. * sgml-expand-element:                   Fold.
  1381. * sgml-fill-element:                     Change and delete.
  1382. * sgml-fold-element:                     Fold.
  1383. * sgml-fold-region:                      Fold.
  1384. * sgml-fold-subelement:                  Fold.
  1385. * sgml-forward-element:                  Move.
  1386. * sgml-general-dtd-info:                 Information from the DTD.
  1387. * sgml-ignore-undefined-elements:        Miscellaneous options.
  1388. * sgml-indent-data:                      Indent.
  1389. * sgml-indent-or-tab:                    Indent.
  1390. * sgml-indent-step:                      Indent.
  1391. * sgml-insert-attribute:                 Insert.
  1392. * sgml-insert-element:                   Insert.
  1393. * sgml-insert-end-tag:                   Insert.
  1394. * sgml-insert-end-tag-on-new-line:       Insert.
  1395. * sgml-insert-missing-element-comment:   Insert.
  1396. * sgml-insert-tag:                       Insert.
  1397. * sgml-kill-element:                     Change and delete.
  1398. * sgml-kill-markup:                      Change and delete.
  1399. * sgml-list-attributes:                  Information from the DTD.
  1400. * sgml-list-content-elements:            Information from the DTD.
  1401. * sgml-list-elements:                    Information from the DTD.
  1402. * sgml-list-occur-in-elements:           Information from the DTD.
  1403. * sgml-list-terminals:                   Information from the DTD.
  1404. * sgml-list-valid-tags:                  Information.
  1405. * sgml-live-element-indicator:           Information.
  1406. * sgml-load-dtd:                         Precompiled DTD Subsets.
  1407. * sgml-local-catalogs:                   Entity manager.
  1408. * sgml-local-ecat-files:                 Precompiled DTD Subsets.
  1409. * sgml-make-character-reference:         Change and delete.
  1410. * sgml-markup-faces:                     Highlight.
  1411. * sgml-max-menu-size:                    Miscellaneous options.
  1412. * sgml-minimize-attributes:              SGML declaration.
  1413. * sgml-mode:                             Invoke.
  1414. * sgml-next-data-field:                  Move.
  1415. * sgml-next-trouble-spot:                Validate.
  1416. * sgml-normalize:                        Change and delete.
  1417. * sgml-normalize-trims:                  Change and delete.
  1418. * sgml-offer-save:                       Validate.
  1419. * sgml-omittag:                          SGML declaration.
  1420. * sgml-omittag-transparent:              Insert.
  1421. * sgml-parent-document:                  Using a Split Document.
  1422. * sgml-parse-prolog:                     Managing the DTD.
  1423. * sgml-public-map:                       Entity manager.
  1424. * sgml-range-indicator-max-length:       Miscellaneous options.
  1425. * sgml-recompile-out-of-date-cdtd:       Precompiled DTD Subsets.
  1426. * sgml-save-dtd:                         Precompiled DTD Subsets.
  1427. * sgml-set-face:                         Highlight.
  1428. * sgml-shorttag:                         SGML declaration.
  1429. * sgml-show-context:                     Information.
  1430. * sgml-split-element:                    Insert.
  1431. * sgml-system-identifiers-are-preferred: Entity manager.
  1432. * sgml-tag-region:                       Insert.
  1433. * sgml-tag-region-if-active:             Insert.
  1434. * sgml-unfold-all:                       Fold.
  1435. * sgml-unfold-element:                   Fold.
  1436. * sgml-unfold-line:                      Fold.
  1437. * sgml-untag-element:                    Change and delete.
  1438. * sgml-up-element:                       Move.
  1439. * sgml-validate:                         Validate.
  1440. * sgml-validate-command:                 Validate.
  1441. * sgml-validate-files:                   Validate.
  1442. * sgml-what-element:                     Information.
  1443. * SHORTTAG:                              SGML declaration.
  1444. * start up:                              Invoke.
  1445. * system identifier:                     Entity manager.
  1446.  
  1447.  
  1448. 
  1449. Tag Table:
  1450. Node: Top984
  1451. Node: Introduction1779
  1452. Node: Install4376
  1453. Node: Invoke6281
  1454. Node: Entity manager7188
  1455. Node: Validate12738
  1456. Node: SGML declaration15264
  1457. Node: Managing the DTD16757
  1458. Node: Precompiled DTD Subsets18036
  1459. Node: Using a Split Document21228
  1460. Node: Inserting a DOCTYPE22784
  1461. Node: Information from the DTD24561
  1462. Node: Edit25627
  1463. Node: Insert26196
  1464. Node: Complete34201
  1465. Node: Information34702
  1466. Node: Indent35869
  1467. Node: Move36531
  1468. Node: Attributes37580
  1469. Node: Change and delete39369
  1470. Node: Translating characters and entities42293
  1471. Node: Display42960
  1472. Node: Fold43244
  1473. Node: Hiding markup44576
  1474. Node: Highlight44719
  1475. Node: Miscellaneous options46093
  1476. Node: Bugs46803
  1477. Node: Index47602
  1478. 
  1479. End Tag Table
  1480.